package com.zhike.b2b.base;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.apache.log4j.Logger;
import org.springframework.jdbc.core.JdbcTemplate;

import com.zhike.b2b.html.impl.HtmlService;
import com.zhike.b2b.sysparam.IParamService;

public class BaseService {
	
	protected JdbcTemplate jt;

	protected Logger logger = Logger.getLogger(getClass());
	
	protected IParamService ps;
	
	protected HtmlService hs;
	
	protected String defaultLogoImg ;

	@Resource
	public void setDataSource(DataSource dataSource) {
		jt = new JdbcTemplate(dataSource);
	}

	 @Resource
	public void setPs(IParamService ps) {
		this.ps = ps;
		defaultLogoImg = ps.getParamValue("default_img");
	}
	@Resource
	public void setHs(HtmlService hs) {
		this.hs = hs;
	}

}
